@import "style/theme.less";

.file-item {
  margin-bottom: 6px;
  &:nth-last-of-type(1) {
    margin-bottom: 0px;
  }
  .file-item-content {
    background-color: #fff;
    padding: 8px;
    border: 1px solid @border-color;
    border-radius: @border-radius-base;
  }
  &.file-fail-item {
    .file-item-content{
      border-color: @red;
    }
  }
  &.file-uploading-item {
    .file-item-content {
      border-color: @blue;
    }
  }
  &.file-item-with-close {
    .file-item-content {
      position: relative;
      padding-right: 44px;
    }
    .file-close-icon {
      position: absolute;
      right: 14px;
      top: 50%;
      font-size: 16px;
      transform: translateY(-50%);
      color: @tip-color;
    }
  }
  &.file-download-item {
    position: relative;
    padding-right: 28px;
    .file-item-extra {
      position: absolute;
      right: 0px;
      top: 50%;
      transform: translateY(-50%);
      color: @primary-color;
      font-size: 20px;
    }
  }

  .file-content {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.material-item {
  display: flex;
  overflow: hidden;
  align-items: center;
  .material-cover {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    &.icon-cover {
      background-color: #d9d9d9;
    }
    .material-icon {
      font-size: 18px;
    }
    .img-icon {
      width: 32px;
      height: 32px;
    }
  }
}

.link-content {
  flex: 1;
  overflow: hidden;
  .link-title {
    overflow: hidden;
    text-overflow: ellipsis;

    .link-title-text {
      word-break: keep-all;
      overflow: hidden;
      text-overflow: ellipsis;
      color: @heading-color;
      white-space: nowrap;
    }
  }

  .link-description {
    word-break: keep-all;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    color: @text-color-secondary;
  }
}

.link-text {
  overflow: hidden;
  text-overflow: ellipsis;
}